#ifndef __KEY_H__
#define __KEY_H__
#include "sys.h"

#define Key0_Port GPIOE
#define Key0_Pin GPIO_Pin_4
#define Key1_Port GPIOE
#define Key1_Pin GPIO_Pin_3
#define Key2_Port GPIOE
#define Key2_Pin GPIO_Pin_2
#define WK_UP_Port GPIOA
#define WK_UP_Pin GPIO_Pin_0

#define Key0_Value GPIO_ReadInputDataBit(Key0_Port ,Key0_Pin) //读取Key0的GPIO电压值
#define Key1_Value GPIO_ReadInputDataBit(Key1_Port ,Key1_Pin) //读取Key1的GPIO电压值
#define Key2_Value GPIO_ReadInputDataBit(Key2_Port ,Key2_Pin) //读取Key2的GPIO电压值
#define WK_UP_Value GPIO_ReadInputDataBit(WK_UP_Port ,WK_UP_Pin) //读取WK_UP的GPIO电压值

#define Key0 1
#define Key1 2
#define Key2 3
#define WK_UP 4

void Key_Init(void);
u8 Key_Scan(u8 model);

#endif